Skip to content

Conversation

@chiefcll
Copy link
Contributor

@chiefcll chiefcll commented Jan 7, 2026

Update Rounded & Border shaders to add border-gap and border-gapColor properties to support offset borders and fill colors inside the gap.

This PR allows gap: 6, gap: 0, and gap: -6 to allow inset

Screenshot 2026-01-07 at 1 25 21 PM Screenshot 2026-01-07 at 1 25 36 PM Screenshot 2026-01-07 at 1 39 53 PM

@jfboeve
Copy link
Collaborator

jfboeve commented Jan 9, 2026

I like the idea of adding this, however I can see that the border alignment has changed from an inside border to an outside border. And the border gap does not work for bordered shaders without rounded edges.

So I want to propose the following changes:

  • add border alignment: inside(default), center, and outside.
  • gap is controlled by the red line you can see in the attached image below
  • add gap, gapColor, aligment to Border template (so you don't have to do the typing for border everywhere you use it).
  • since all shaders have a canvas2d copy we will also need these changes for those versions.
border-proposition

@chiefcll
Copy link
Contributor Author

chiefcll commented Jan 9, 2026

Thanks for the feedback and visual.

Most (all) designs want outside and that is the default with CSS / Web. I've never seen an inside border before Lightning. Additionally, I'm not sure what a "center" alignment would be nor what value that would offer which makes it best to just drop that.

A gap going inside might be weird as well. Inside border probably shouldn't support a gap. I don't think the graphic represents that correctly. I would think a gap is before the border starts, so you'd have Blue, redline, and an interior border after the gap.

So if we do inside and outside alignment, gap would only be supported on outside. I think we're just increasing complexity for a feature folks won't use.

I'll work on the Border and canvas shader.. @elsassph Any comment from you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants